package com.aop.admin.android_aop_log;

import android.Manifest;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {

    View.OnClickListener clickListener=new View.OnClickListener() {
        @Override
        public void onClick(View v) {

        }
    };

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE,Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS},0);
        toolUtils.getFilesDir(this);
        setContentView(R.layout.activity_main);
        String s="hh";
        int i=2;
        double d=5.0;
        boolean boo=false;
        Button tb=new Button(this);

        click(s,i,d,boo,new Ck(),((TextView)findViewById(R.id.tv2)),tb,clickListener);

        findViewById(R.id.tv).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(MainActivity.this,"123",Toast.LENGTH_SHORT).show();
            }
        });
        findViewById(R.id.tv2).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String str=null;
                str.length();
            }
        });
        findViewById(R.id.tv).setOnLongClickListener(new View.OnLongClickListener() {
            @Override
            public boolean onLongClick(View v) {
                return false;
            }
        });
        findViewById(R.id.tv2).setOnLongClickListener(new View.OnLongClickListener() {
            @Override
            public boolean onLongClick(View v) {
                return false;
            }
        });
        findViewById(R.id.tv3).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(MainActivity.this,SecoedPage.class));
            }
        });
    }


    void click(String s, int i, double d, boolean boo, Ck ck, TextView viewById, Button tb, View.OnClickListener clickListener){

    }


    class Ck{
        String kk="polk";
        int nn=876;

        @Override
        public String toString() {
            return "Ck{" +
                    "kk='" + kk + '\'' +
                    ", nn=" + nn +
                    '}';
        }
    }
}
